
<template>
    <div style="width: 100px">
        <div ref="qrcode" style="width:100px; height:100px;"></div>
    </div>
</template>
<script>
    export default {
        props: {
            url: {
                default: window.location.href,
                type: String
            }
        },
        mounted() {
            this.$nextTick(() => {
                var qrcode = new QRCode(this.$refs.qrcode, {
					width : 100,
					height : 100,
                    colorDark : "#07c160",
                    colorLight : "#ffffff",
				});
                // let url = this.url;
				qrcode.makeCode(this.url);
            })
        },
    }

</script>